10WAIT 0
20RANDOMIZE
30CLS
40IF INKEY$ <>"" THEN 40
50LOCATE 7,2
60PRINT "CALC GAME"
70LOCATE 6,4
80PRINT "PUSH ANY KEY"
100IF INKEY$ ="" GOTO 100
101T=0
102I=0
103N=0
110CLS
120WAIT 0
130IF INKEY$ <>"" THEN 130
140OP= 1
150SWITCH OP
160CASE 1
170 C= RND 10
180 A= FIX RND C
190 B= C-A
200 O$="+"
210CASE 2
220 A= RND 99
230 B= RND A
240 C= A-B
250 O$="-"
260CASE 3
270 A= RND 19
280 B= RND 10
290 C=A*B
300 O$="*"
310CASE 4
320 B= RND 9
330 C= RND 9
340 A=B*C
350 O$="/"
360ENDSWITCH
370USING "###"
380CLS
390WAIT 0
400LOCATE 4,1
410PRINT A;
420PRINT " ";O$;
430PRINT B;
440PRINT "="
450R=0
460K$= INKEY$
465T=T+1
470IF K$="" THEN 460
480KA= ASC K$
490IF KA>=48 AND KA<=57 THEN R=R*10+KA-48
500IF R>9999 THEN R=R\10
510IF KA=13 THEN 580
520IF KA=23 THEN R=R\10
530USING "#####"
540LOCATE 10,3
550PRINT R
560IF INKEY$ <>"" THEN 560
570GOTO 460
580IF INKEY$ <>"" THEN 580
590IF R=C THEN 640
600WAIT 64
610LOCATE 10,4
620PRINT "(-_-)"
625N=N+1
630GOTO 370
640WAIT 64
650LOCATE 10,4
660PRINT "(^o^)!"
665I=I+1
666IF I=10 THEN 700
670GOTO 110
700CLS
710WAIT 128
715USING
720LOCATE 6,0
730PRINT "RESULT"
740LOCATE 4,2
750PRINT "TIME    ";
760PRINT USING ; T
770LOCATE 4,3
780PRINT "RATIO   ";
790PRINT USING "####.#"; 100*I/(I+N);"%"
800IF INKEY$ ="" GOTO 800
810GOTO 10
